import http from "@/utils/http";
import {GW} from '@/common/const';
/**
 * 龙虎榜按板块分类数量
 * @param {Object} option
 * @param {Number} option.date - 时间
 *
 * @return {Promise} Array
 */
export function typeCount(option) {
  const url = `${GW}/gw/ynstockinfo/client/stockhero/count`;
  const params = {
    date: "",
    ...option
  };
 return http.get(url,  params );

}
/**
 * 条件查询龙虎榜相关数据
 * @param {Object} option
 * @param {Object} option.blockType - 板块分类  012001沪市 012002深市 012003中小企业 012015创业板 012029科创板
 * @param {Object} option.date - 时间
 * @return {Promise} Object
 */
export function getTableDate(option) {
    const url = `${GW}/gw/ynstockinfo/client/stockhero/data`;
    const params = {
      blockType: "",
      date: "",
      ...option
    };
    const res = http.get(url, params);
    return res;
  }
  